﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Reflection.Metadata;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using SDL3;
using 飞机大战.scene;
using Silk.NET.SDL;
using OpenTK.Graphics.OpenGL4;
using OpenTK.Input;
using OpenTK.Windowing.Desktop;
using OpenTK.Windowing.GraphicsLibraryFramework;

namespace 飞机大战
{
    internal partial class Game
    {
        private int width_ = 0;
        private int height_ = 0;

        private IntPtr window_;
        private bool is_running_ = true;
        private nint FPS_ = 120;
        private ulong frame_delay_ = 0;
        private ulong dt_ = 0;
        private SceneMain current_scene_;

        public SceneMain Current_scene_ {  get { return current_scene_; } }

        // 主体函数
        static private Game? instance;
        private Game() { }

        public static partial Game GetInstance();

        public partial void Init(string title, int width, int height);

        public partial void HandleEvents();

        public partial void Update(float dt);

        public partial void Render();

        public partial void Clean();

        public partial void Run();

        // 工具函数

        public int Width_ {  get { return width_; } }

        public int Height_ { get { return height_; } }
    }
}
